<?php /* Smarty version 3.1.24, created on 2015-07-13 10:18:13
         compiled from "F:/WAMP/NewWAMP/wamp/www/display/display_news.html" */ ?>
<?php
/*%%SmartyHeaderCode:901955a31fe5758938_43283519%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '10f18cfbb0560f5458416845cc70dd7f209ee225' => 
    array (
      0 => 'F:/WAMP/NewWAMP/wamp/www/display/display_news.html',
      1 => 1436752487,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '901955a31fe5758938_43283519',
  'variables' => 
  array (
    'current_locat' => 0,
    'news_title' => 0,
    'news_fabu_time' => 0,
    'news_fabu_name' => 0,
    'news_comment_canyu' => 0,
    'news_comment_pinglun' => 0,
    'display_content' => 0,
    'commentnewscontent' => 0,
    'pinglun_time_more' => 0,
    'pinglun_hot_more' => 0,
    'pinglun_my_more' => 0,
    'get_newsid' => 0,
  ),
  'has_nocache_code' => false,
  'version' => '3.1.24',
  'unifunc' => 'content_55a31fe5804762_57103242',
),false);
/*/%%SmartyHeaderCode%%*/
if ($_valid && !is_callable('content_55a31fe5804762_57103242')) {
function content_55a31fe5804762_57103242 ($_smarty_tpl) {

$_smarty_tpl->properties['nocache_hash'] = '901955a31fe5758938_43283519';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新闻内容标题</title>
<link rel="stylesheet" href="style/display_news.css">
<?php echo '<script'; ?>
 type="text/javascript" src="./js/jquery-1.8.0.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript">
	var pinglun_time_more_next=5;
	var pinglun_hot_more_next=5;
	var pinglun_my_more_next=5;
	var get_newsid=0;
	$(document).ready(function(e) {
        $("#qiehuan_pinglun_time").click(function(){
			$("#qiehuan_pinglun_time").css({"border-bottom":"2px solid #379BE9"});
			$("#qiehuan_pinglun_hot").css({"border-bottom":"none"});
			$("#qiehuan_pinglun_my").css({"border-bottom":"none"});
			$("#pinglun_hot_all").css("display","none");
			$("#pinglun_my_all").css("display","none");
			$("#pinglun_time_all").css("display","block");
			});
			
			
		$("#qiehuan_pinglun_hot").click(function(){
			$("#qiehuan_pinglun_hot").css({"border-bottom":"2px solid #379BE9"});
			$("#qiehuan_pinglun_time").css({"border-bottom":"none"});
			$("#qiehuan_pinglun_my").css({"border-bottom":"none"});
			$("#pinglun_my_all").css("display","none");
			$("#pinglun_time_all").css("display","none");
			$("#pinglun_hot_all").css("display","block");
			
			get_newsid=parseInt($("#get_newsid").html());
			$.post(
				"phpfile/qiehuan_pinglun_hot.php",
				{newsid:get_newsid},
				function(data){
					//$("#pinglun_time").prepend("<h1 style='color:red;'>"+comment_content+"</h1>");				
						$("#pinglun_hot").html(data.commentnewscontent);
						$("#pinglun_hot_more").html(data.pinglun_hot_more);
						$("#pinglun_hot_more").css("display","block");
				},
				"json"
				);
			});
			
			
		$("#qiehuan_pinglun_my").click(function(){		
			get_newsid=parseInt($("#get_newsid").html());
			$.post(
				"phpfile/qiehuan_pinglun_my.php",
				{newsid:get_newsid},
				function(data){
					//$("#pinglun_time").prepend("<h1 style='color:red;'>"+comment_content+"</h1>");
					//alert(data);
						if(data=="1"){
							alert("请先登陆！");
						}
						else{
							$("#qiehuan_pinglun_my").css({"border-bottom":"2px solid #379BE9"});
							$("#qiehuan_pinglun_time").css({"border-bottom":"none"});
							$("#qiehuan_pinglun_hot").css({"border-bottom":"none"});
							$("#pinglun_hot_all").css("display","none");
							$("#pinglun_time_all").css("display","none");
							$("#pinglun_my_all").css("display","block");
							
							$("#pinglun_my").html(data);
							$("#pinglun_my_more").css("display","block");
						}
				},
				"html"
				);
			
		});
		
		////////////发表评论
		$("#comment_submit").click(function(){
			get_newsid=parseInt($("#get_newsid").html());
			var comment_content = $("#editor_textarea").val();
			if(comment_content==""){
				alert("请输入评论内容！");
			}
			else{
				
				$.post("../minGanci/testMain.php",{content:comment_content},function(data){
					//alert(data);
					if(data=="0"){
						//$("#pinglun_time").prepend("<h1>"+comment_content+"</h1>");
						$.post(
							"phpfile/comment_upload.php",
							{content:comment_content,newsid:get_newsid},
							function(data){
								//alert(data);
					//$("#pinglun_time").prepend("<h1 style='color:red;'>"+comment_content+"</h1>");
								$("#pinglun_time").prepend("<div class='pinglun_content' id='pinglun_content'><div class='pinglun_user_img'><img src='images/userpic.jpg' alt='' class='pinglun_user_img_style'></div><div class='pinglun_content_right'><p class='pinglun_username_time'><span id='pinglun_username'>"+data.commentusername+"</span><span id='fabu_pinglun_time'>"+data.time+"</span></p><p class='pinglun_detail_content'>"+comment_content+"</p><p class='pinglun_zan_jubao'><a href='javascript:void(0);' onclick='js_zan("+data.commentid+")' id='pinglun_zan_a_"+data.commentid+"'><span id='pinglun_zan'>赞(<span id='comment_zan_number_"+data.commentid+"'>0</span>)</span></a> <a href='javascript:void(0);' onclick='js_jubao("+data.commentid+")' id='pinglun_jubao_a_"+data.commentid+"'><span id='pinglun_jubao'>举报（<span id='comment_jubao_number_"+data.commentid+"'>0</span>）</span></a></p></div><div style='clear:both;'></div></div>");
							},
							"json"
						);
						alert("评论成功！");
					}
					else{
						alert("评论内容存在敏感词，请修改内容。")
					}				
				});     ///////////post结束
			}
		});		
		////////////发表评论结束
    });
function js_zan(commentid){
	get_newsid=parseInt($("#get_newsid").html());
			$.post(
				"phpfile/zan_jubao_increase.php",
				{newsid:commentid,zanjubao:"1"},
				function(data){
					//alert(data);
					if(data=="1"){
						var comment_zan_number=parseInt($("#comment_zan_number_"+commentid).html())+1;
						$("#comment_zan_number_"+commentid).html(comment_zan_number);
						$("#pinglun_zan_a_"+commentid).removeAttr("onclick");
						$("#pinglun_jubao_a_"+commentid).removeAttr("onclick");
					}
				},
				"html"
			);
	
}
function js_jubao(commentid){
	get_newsid=parseInt($("#get_newsid").html());
			$.post(
				"phpfile/zan_jubao_increase.php",
				{newsid:commentid,zanjubao:"2"},
				function(data){
					if(data=="2"){
						var comment_jubao_number=parseInt($("#comment_jubao_number_"+commentid).html())+1;
						$("#comment_jubao_number_"+commentid).html(comment_jubao_number);
						$("#pinglun_zan_a_"+commentid).removeAttr("onclick");
						$("#pinglun_jubao_a_"+commentid).removeAttr("onclick");
					}
				},
				"html"
			);
	
}
function js_pinglun_time_more(commentnewsid){
	$.post(
		"phpfile/pinglun_time_more.php",
		{newsid:commentnewsid,next:pinglun_time_more_next},
		function(data){
					//$("#pinglun_time").prepend("<h1 style='color:red;'>"+comment_content+"</h1>");
					if(data=="1"){
						$("#pinglun_time").append("<div class='nomore_comment_content'>没有更多评论~</div>");
						$("#pinglun_time_more").css("display","none");
					}
					else{
						$("#pinglun_time").append(data);
					}
			},
		"html"
	);
	pinglun_time_more_next=pinglun_time_more_next+5;
}
function js_pinglun_hot_more(commentnewsid){
	$.post(
		"phpfile/pinglun_hot_more.php",
		{newsid:commentnewsid,next:pinglun_hot_more_next},
		function(data){
					//$("#pinglun_time").prepend("<h1 style='color:red;'>"+comment_content+"</h1>");
					if(data=="1"){
						$("#pinglun_hot").append("<div class='nomore_comment_content'>没有更多评论~</div>");
						$("#pinglun_hot_more").css("display","none");
					}
					else{
						$("#pinglun_hot").append(data);
					}
			},
		"html"
	);
	pinglun_hot_more_next=pinglun_hot_more_next+5;
}
function js_pinglun_my_more(commentnewsid){
	$.post(
		"phpfile/pinglun_my_more.php",
		{newsid:commentnewsid,next:pinglun_my_more_next},
		function(data){
					//$("#pinglun_time").prepend("<h1 style='color:red;'>"+comment_content+"</h1>");
					if(data=="1"){
						$("#pinglun_my").append("<div class='nomore_comment_content'>没有更多评论~</div>");
						$("#pinglun_my_more").css("display","none");
					}
					else{
						$("#pinglun_my").append(data);
					}
			},
		"html"
	);
	pinglun_my_more_next=pinglun_my_more_next+5;
}
<?php echo '</script'; ?>
>
</head>

<body>
<!--顶部开始-->
<div class="head">
	<div class="head_top">
    	<ul>
        	<li><a href="#">上网首页</a></li>
            <li><a href="#">影视</a></li>
            <li><a href="#">游戏</a></li>
            <li><a href="#">新闻</a></li>
            <li><a href="#">登陆</a></li>
            <li><a href="#">注册</a></li>
        </ul>
    </div>
    
    <div class="head_bottom">
    	<p class="current_locat" id="current_locat"><?php echo $_smarty_tpl->tpl_vars['current_locat']->value;?>
 </p>
    </div>
    <div style="clear:both"></div>
</div>
<!--顶部结束-->

<!--中间内容部分  content_left_news为左边新闻部分  content_left_comment为左边评论部分 -->
<div class="content">
	<div class="content_left">
		<div class="content_left_news">
        	<div class="display_title">
            	<p class="news_title" id="news_title"><?php echo $_smarty_tpl->tpl_vars['news_title']->value;?>
</p>
                <p class="news_fabu_time" id="news_fabu_time"><?php echo $_smarty_tpl->tpl_vars['news_fabu_time']->value;?>
</p>
                <p class="news_fabu_name">来源：<span id="news_fabu_name"><?php echo $_smarty_tpl->tpl_vars['news_fabu_name']->value;?>
</span>
                	<a href="#" target="_blank"><span id="news_comment_canyu"><?php echo $_smarty_tpl->tpl_vars['news_comment_canyu']->value;?>
人参与</span></a>
               		<a href="#" target="_blank"><span id="news_comment_pinglun"><?php echo $_smarty_tpl->tpl_vars['news_comment_pinglun']->value;?>
人评论</span></a>
                </p>
            </div>
            <div class="display_content" id="display_content">
            	<?php echo $_smarty_tpl->tpl_vars['display_content']->value;?>

            </div>
    	</div>
        
        <div class="content_left_comment">
    	</div>
    </div>
    
    <div class="content_right">
    </div>
    
    <div style="clear:both"></div>
</div>
<!--中间部分结束-->

<!--评论部分-->
<div class="content_left_comment">
	<div class="editor_content">
    	<p class="editor_content_p1"><span id="wangyoupinglun">网友评论</span>文明上网理性发言，请遵守新闻评论服务协议
        	<a href="#" target="_blank"><span id="comment_pinglun_number"><?php echo $_smarty_tpl->tpl_vars['news_comment_pinglun']->value;?>
人评论</span></a>
            <a href="#" target="_blank"><span id="comment_canyu_number"><?php echo $_smarty_tpl->tpl_vars['news_comment_canyu']->value;?>
人参与</span></a>          
        </p>
        <textarea id="editor_textarea" class="editor_textarea" ></textarea>
        <p class="editor_content_p2"><button id="comment_submit">发表评论</button></p>
    </div>
    
    <div class="qiehuan_pinglun_time_hot_my">
    	<ul>
        	<li id="qiehuan_pinglun_time">最新评论</li>
            <li id="qiehuan_pinglun_hot">热门评论</li>
            <li id="qiehuan_pinglun_my">我的评论</li>
        </ul>
    </div>
    <!--最新评论开始-->
    <div class="pinglun_time_all" id="pinglun_time_all">
    	<div class="pinglun_time" id="pinglun_time">
        	<?php echo $_smarty_tpl->tpl_vars['commentnewscontent']->value;?>

        	<div style="clear:both;"></div>
    	</div>
        <div class="pinglun_time_more" id="pinglun_time_more">
        	<?php echo $_smarty_tpl->tpl_vars['pinglun_time_more']->value;?>

    		<!--<a href="javascript:void(0);" onclick="js_pinglun_time_more(99)">加载更多</a>-->
    	</div>
        <div style="clear:both;"></div>
    </div>
    <!--最新评论结束-->
    
    <!--热门评论开始-->
    <div class="pinglun_hot_all" id="pinglun_hot_all">
    	<div class="pinglun_hot" id="pinglun_hot">
        </div>
    	<div class="pinglun_hot_more" id="pinglun_hot_more">
        	<!--<?php echo $_smarty_tpl->tpl_vars['pinglun_hot_more']->value;?>

    		<a href="javascript:void(0);" onclick="js_pinglun_hot_more(99)">加载更多</a>-->   	
        <div style="clear:both;"></div>
    	</div>
    </div>
    <!--热门评论结束-->
    
    <!--我的评论开始-->
    <div class="pinglun_my_all" id="pinglun_my_all">
    	<div class="pinglun_my" id="pinglun_my">
        <!--<div class="no_comment_content">没有相关评论~</div>
        <div class="nomore_comment_content">没有更多评论~</div>-->
        </div>
    	<div class="pinglun_my_more" id="pinglun_my_more">
        	<?php echo $_smarty_tpl->tpl_vars['pinglun_my_more']->value;?>

    		<!--<a href="javascript:void(0);" onclick="js_pinglun_my_more(99)">加载更多</a>-->
    	</div>
        <div style="clear:both;"></div>
    </div>
    <!--我的评论结束-->
    <div class="get_newsid" id="get_newsid"><?php echo $_smarty_tpl->tpl_vars['get_newsid']->value;?>
</div>
</div>
<!--评论部分结束-->
</body>
</html>
<?php }
}
?>